.translation-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f8f9fa;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.translation-bar.hidden {
    transform: translateY(-100%);
}

.translation-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

#translate-toggle {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 100px;
}

#translate-toggle:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#translate-toggle:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#target-language {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

#target-language:hover {
    border-color: #007bff;
}

#target-language:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.progress-bar {
    flex-grow: 1;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar.show {
    opacity: 1;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0;
    transition: width 0.3s ease;
    animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 添加响应式设计 */
@media (max-width: 600px) {
    .translation-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    #translate-toggle,
    #target-language {
        width: 100%;
    }
    
    .progress-bar {
        margin-top: 8px;
    }
}
